package com.elitel.frame.base.controller;

import com.elitel.frame.business.service.NetcdfService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @author hi_bj
 */
@Controller
@RequestMapping("/api/nc")
public class NetcdfController {

    
    private static final Logger logger = LoggerFactory.getLogger(NetcdfController.class);
    
    @Resource
    NetcdfService netcdfService;

    @ResponseBody
    @RequestMapping("/testNc")
    public String testNc(HttpServletRequest request){
        logger.info("开始测试生成NC文件");
        netcdfService.createNcFile(request);
        return "success";
    }
}
